package com.alex.statistics.pojo.request.clusterAnalysis;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

@Data
@Schema(description = "K-Means聚类请求参数")
public class KMeansRequest {
    @Schema(description = "待聚类的数据集合，每个元素是一个特征向量", required = true,
            example = "[[1.2, 2.5], [3.7, 4.1], [5.9, 6.3], [7.2, 8.4]]")
    private List<double[]> data;

    @Schema(description = "聚类数量，当k=0时自动确定最佳聚类数", example = "3")
    private int k = 0;

    @Schema(description = "最大聚类数（用于自动确定k值）", example = "10")
    private int maxK = 10;

    @Schema(description = "最大迭代次数", example = "300")
    private int maxIterations = 300;

    @Schema(description = "收敛容差", example = "1e-4")
    private double tolerance = 1e-4;
}    